/* eslint-disable @typescript-eslint/no-explicit-any */
import * as echarts from 'echarts/core'
import { LineChart, MapChart } from 'echarts/charts'
import {
  TitleComponent,
  TooltipComponent,
  GridComponent,
  LegendComponent,
  ToolboxComponent,
  VisualMapComponent,
  DataZoomComponent
} from 'echarts/components'
// 标签自动布局，全局过渡动画等特性
import { UniversalTransition } from 'echarts/features'
// 引入 Canvas 渲染器，注意引入 CanvasRenderer 或者 SVGRenderer 是必须的一步
import { CanvasRenderer } from 'echarts/renderers'
import chinaMap from './chinaMap'

// 注册地图
echarts.registerMap('china', chinaMap as any)

// 注册必须的组件
echarts.use([
  CanvasRenderer,
  LineChart,
  GridComponent,
  TooltipComponent,
  UniversalTransition,
  TitleComponent,
  LegendComponent,
  ToolboxComponent,
  VisualMapComponent,
  DataZoomComponent,
  MapChart
])

export default echarts
